import 'package:flutter/material.dart';
import '../../widgets/menu_button.dart';
import '../system/fontsize_provider.dart';
import 'package:provider/provider.dart';

class OutboundScreen extends StatelessWidget {
  const OutboundScreen({super.key});
  static double _fontScale = 0.7;

  @override
  Widget build(BuildContext context) {
    _fontScale = Provider.of<FontSizeProvider>(context).fontScale;
    return Scaffold(
      appBar: AppBar(
        title: Text('Outbound',style: TextStyle(fontSize: 18 * _fontScale),),
        leading: IconButton(
          icon: const Icon(Icons.arrow_back,color: Color.fromARGB(255, 255, 255, 255)),
          onPressed: () => Navigator.pushNamed(context, '/home'),
        ),
        actions: [
          IconButton(
            icon: const Icon(Icons.home,color: Color.fromARGB(255, 255, 255, 255)),
            onPressed: () => Navigator.pushNamed(context, '/home'),
          ),
        ],
        backgroundColor: const Color(0xFF008363),
      ),
      body: Padding(
        padding: const EdgeInsets.all(32),
        child: GridView.count(
          crossAxisCount: 2,
          crossAxisSpacing: 16,
          mainAxisSpacing: 16,
          childAspectRatio: 1.3,
          children: [
            MenuButton(
              icon: Icons.receipt,
              label: 'Single Picking',
              color: Colors.blue,
              onTap: () => Navigator.pushNamed(context, '/outbound/single-picking'),
            ),
            MenuButton(
              icon: Icons.local_shipping,
              label: 'Shipment',
              color: Colors.green,
              onTap: () => Navigator.pushNamed(context, '/outbound/shipment'),
            ),
            MenuButton(
              icon: Icons.qr_code,
              label: 'Batch Picking',
              color: Colors.grey,
              // onTap: () => Navigator.pushNamed(context, '/outbound/batch-picking'),
              onTap: () =>{},
            ),
          ],
        ),
      ),
    );
  }
}